package com.starlink.model.util;

import com.starlink.model.dtomapper.PointsAcquireBillDtoMapper;
import com.starlink.model.domain.PointsAcquireBillDO;
import com.starlink.model.vo.PointsAcquireBillVO;
import com.google.common.collect.Lists;
import org.apache.commons.collections4.CollectionUtils;

import java.util.ArrayList;
import java.util.List;

/**
 * @author zhanghong
 */
public class PointsAcquireBillConvert {

    public static List<PointsAcquireBillVO> buildPointsAcquireBillVoList(List<PointsAcquireBillDO> pointsAcquireBillDOList) {
        if (CollectionUtils.isEmpty(pointsAcquireBillDOList)) {
            return Lists.newArrayList();
        }
        List<PointsAcquireBillVO> pointsAcquireBillVOList = new ArrayList<>();
        for (PointsAcquireBillDO pointsAcquireBillDO : pointsAcquireBillDOList) {
            pointsAcquireBillVOList.add(PointsAcquireBillDtoMapper.INSTANCE.do2VO(pointsAcquireBillDO));
        }

        return pointsAcquireBillVOList;
    }
}
